const path = require('path')
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  pages: {
    index: {
      entry: 'src/main.js',
      template: 'public/index.html',
      filename: 'index.html'
    }
  },
  publicPath: './',
  lintOnSave: false,
  css: {
    loaderOptions: {
      // `scss` 语法会要求语句结尾必须有分号
      scss: {
        additionalData: '@import "~@/assets/scss/global-vars.scss";'
      }
    }
  },
  chainWebpack: config => {
    config.module
      .rule('js')
      .include.add(/plugins/).end()
      .use('babel')
      .loader('babel-loader')
      .tap(options  => {
         return options
      })
  }
})
